/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Clear text from given node
 */
function clearText(node){
    node.value = '';
}

/**
 * set text for given node
 */
function setText(node, str){
    node.value = str;
}

/**
 * Check re-enter password when register new account.
 */
function confirmPassword(){
    var password = document.getElementsByName('password')[0].value;
    var confirm_password = document.getElementsByName('confirm_password')[0].value;

    if(password && confirm_password && password != confirm_password){
        alert("Confirm password not match!")
        return false;
    }

    return true;
}